home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / MorphOS / Epic4_mos / share / epic / script / country < prev    next >
Encoding:
Text File  |  2002-10-28  |  7.6 KB  |  196 lines

  1. /*
  2.  * This script is used with permission.
  3.  *
  4.  * Copyright 1993, 1994 Daniel Cedras
  5.  * Copyright 1995, 1996 Daniel Cedras and Jeremy Nelson
  6.  */
  7.  
  8. /*
  9.     Country code lookup
  10.     Country information compiled by Daniel Cedras (cedras@texas.net)
  11.     Software written by Jeremy Nelson
  12.     Requires ircII-EPIC4pre.
  13.     Last modified (01/31/97) by Jeremy Nelson
  14.  
  15.     How to use:
  16.  
  17.         /country
  18.  
  19.         Brief Usage Instructions.
  20.  
  21.  
  22.         /country <arg>
  23.  
  24.         With no flags, the alias attempts to look up the
  25.         userhost of the argument "as-if" it were a nickname.
  26.         If the userhost lookup is successful, it then figures
  27.         out the name of that nick's domain.  If the lookup is
  28.         not successful, then it will try to do a lookup on the
  29.         name itself.
  30.  
  31.  
  32.         /country <flags> <arg>
  33.  
  34.         Supported for backwards compatibility are the ability
  35.         to specify flags.  All flags (except for -n, which is
  36.         strictly ignored) have the same effect, and that is
  37.         to circumvent the userhost lookup and do a direct
  38.         lookup on the argument.  The previous meanings of the
  39.         flags are no longer supported as they make no sense now.
  40.  
  41.  
  42.         /lcountry <country>
  43.         /lcode <code>
  44.         Do a forced lookup
  45.  
  46.  
  47.         NOTE:
  48.         You can (and should) use wildcards anywhere you want.
  49. */
  50.  
  51. alias country.help
  52. {
  53.     echo *** USE: /country <nickname>  or  /country <country_code>
  54.     echo ***      Will tell you what country nickname is from or
  55.     echo ***      What the country corresponding to the Isometric code is
  56.     echo ***      /country <country_name>  
  57.     echo ***      Will tell you what the Isometric code is for that country
  58.     echo ***      Using any flag besides -n will bypass the nick lookup.
  59.     echo ***      This is required for arguments with asterisks in them.
  60. }
  61.  
  62. alias country 
  63. {
  64.     switch ($0)
  65.     {
  66.         ()
  67.             {country.help} 
  68.         (-n)
  69.             {country $1-}
  70.         (-*) 
  71.             {country.lookup $1-}
  72.         (*\\**)
  73.         ("* *")
  74.             {country.lookup $*}
  75.         (*) 
  76.         {
  77.             local args $*
  78.             userhost $0 -cmd 
  79.             {
  80.                 bless
  81.                 if ([$3] == [<UNKNOWN>])
  82.                 {
  83.                     country.lookup $args
  84.                 }
  85.                 {
  86.                     country.lookup $after(-1 . $4)
  87.                 }
  88.             }
  89.             wait
  90.         }
  91.     }    
  92. }
  93.  
  94.  
  95. /* This is an internal alias -- not intended for direct call */
  96. alias country.lookup
  97. {
  98.     echo *** Looking for  $TOUPPER($*)  ... Be patient !
  99.  
  100.     fe ($country.info) aa ab
  101.     {
  102.         if (match("$*" "$aa") || match("$*" "$ab"))
  103.         {
  104.             echo +++ $toupper($aa) is $toupper($ab)
  105.                 }
  106.         }
  107.     echo *** DONE !
  108. }
  109.  
  110. alias lcountry country -c
  111. alias lcode country -i
  112.  
  113. ############ THE ACTUAL DATABASE:
  114.  
  115. push country.info Afghanistan AF Albania AL Algeria DZ "American Samoa" AS
  116. push country.info Andorra AD Angola AO Anguilla AI Antarctica AQ
  117. push country.info "Antigua and Barbuda" AG Argentina AR Armenia AM Aruba AW
  118. push country.info Australia AU Austria AT Azerbaijan AZ Bahamas BS
  119. push country.info Bahrain BH Bangladesh BD Barbados BB Belarus BY
  120. push country.info Belguim BE Belize BZ Benin BJ Bermuda BM
  121. push country.info Bhutan BT Bolivia BO Bosnia BA Botswana BW
  122. push country.info "Bouvet Island" BV Brazil BR "British Indian Ocean Territory" IO
  123. push country.info "Brunei Darussalam" BN Brunei BN Bulgaria BG "Burkina Faso" BF
  124. push country.info Burundi BI "Byelorussian SSR" BY Cambodia KH Cameroon CM
  125. push country.info Canada CA "Cap Verde" CV "Cayman Islands" KY "Central African Republic" CF
  126. push country.info Chad TD Chile CL China CN "Christmas Island" CX
  127. push country.info "Cocos (Keeling) Islands" CC Columbia CO Comoros KM Congo CG
  128. push country.info "Cook Islands" CK "Costa Rica" CR "Cote D'Ivoire" CI Croatia HR
  129. push country.info Hrvatska HR Cuba CU Cybrus CY Czechoslovakia CS
  130. push country.info Denmark DK Djibouti DJ Dominica DM "Dominican Republic" DO
  131. push country.info "East Timor" TP Ecuador EC Eqypt EG "El Salvador" SV
  132. push country.info "Equatorial Guinea" GQ Estonia EE Ethiopia ET "Falkland Islands" FK
  133. push country.info Malvinas FK "Faroe Islands" FO Fiji FJ Finland FI
  134. push country.info France FR "French Guiana" GF "French Polynesia" PF 
  135. push country.info "French Southern Territories" TF Gabon GA Gambia GM Georgia GE
  136. push country.info Germany DE Deutschland DE Ghana GH Gibraltar GI Greece GR
  137. push country.info Greenland GL Grenada GD Guadeloupe GP Guam GU
  138. push country.info Guatemala GT Guinea GN "Guinea Bissau" GW
  139. push country.info Gyana GY Haiti HT "Heard and Mc Donald Islands" HM
  140. push country.info Honduras HN "Hong Kong" HK Hungary HU Iceland IS India IN
  141. push country.info Indonesia ID Iran IR Iraq IQ Ireland IE Israel IL Italy IT
  142. push country.info Jamaica JM Japan JP Jordan JO Kazakhstan KZ Kenya KE
  143. push country.info Kiribati KI "North Korea" KP "South Korea" KR Kuwait KW
  144. push country.info Kyrgyzstan KG Lao LA Laos LA Latvia LV Lebanon LB Lesotho LS
  145. push country.info Liberia LR "Libyan Arab Jamahiriya" LY Lybia LY
  146. push country.info Liechtenstein LI Lituania LT Luxembourg LU Macau MO
  147. push country.info Macedonia MK Madagascar MG Malawi MW Malaysia MY
  148. push country.info Maldives MV Mali ML Malta MT "Marshall Islands" MH 
  149. push country.info Martinique MQ Mauritania MR Mauritius MU Mexico MX 
  150. push country.info Micronesia FM Moldova MD Monaco MC Mongolia MN Montserrat MS
  151. push country.info Morocco MA Mozambique MZ Myanmar MM Namibia NA Nauru NR
  152. push country.info Nepal NP Netherlands NL "Netherlands Antilles" AN
  153. push country.info "Neutral Zone" NT "New Caledonia" NC "New Zealand" NZ
  154. push country.info Nicaragua NI Niger NE Nigeria NG Niue NU "Norfolk Island" NF
  155. push country.info "Northern Mariana Islands" MP Norway NO Oman OM Pakistan PK
  156. push country.info Palau PW Panama PA "Papua New Guinea" PG Papua PG 
  157. push country.info "New Guinea" PG Paraguay PY Peru PE Philippines PH Pitcairn PN
  158. push country.info Poland PL Portugal PT "Puerto Rico" PR Qatar QA Reunion RE
  159. push country.info Romania RO "Russian Federation" RU Rwanda RW
  160. push country.info "Saint Kitts and Nevis" KN "Saint Lucia" LC
  161. push country.info "Saint Vincent and the Grenadines" VC Samoa WS
  162. push country.info "San Marino" SM "Sao Tome and Principe" ST "Saudi Arabia" SA
  163. push country.info Senegal SN Seychelles SC "Sierra Leone" SL Singapore SG
  164. push country.info Slovania SI "Solomon Islands" SB Somalia SO "South Africa" ZA
  165. push country.info Spain ES "Sri Lanka" LK "St. Helena" SH
  166. push country.info "St. Pierre and Miquelon" PM Sudan SD Suriname SR
  167. push country.info "Svalbard and Jan Mayen Islands" SJ Swaziland SZ Sweeden SE
  168. push country.info Switzerland CH "Cantons of Helvetia" CH 
  169. push country.info "Confederation Helvetique" CH "Syrian Arab Republic" SY
  170. push country.info Syria SY Taiwan TW Tajikistan TJ Tanzania TZ Thailand TH
  171. push country.info Togo TG Tokelau TK Tonga TO "Trinidad and Tobago" TT
  172. push country.info Tunisia TN Turkey TR Turkmenistan TM "Turks and Caicos Islands" TC
  173. push country.info Tuvalu TV Uganda UG "Ukranian SSR" UA "United Arab Emirates" AE
  174. push country.info "United Kingdom" UK "Great Britain" GB
  175. push country.info "United States of America" US "United States" US
  176. push country.info "Unites States Minor Outlying Islands" UM Uruguay UY USSR SU
  177. push country.info "Soviet Union" SU Uzbekistan UZ Vanuatu VU Vatican VA
  178. push country.info "Vatican City State" VA Venezuela VE "Viet Nam" VN
  179. push country.info "Virgin Islands (US)" VI "Virgin Islands (UK)" VG
  180. push country.info "Wallis and Futuna Islands" WF "Western Sahara" EH
  181. push country.info Yemen YE Yugoslavia YU Zaire ZR Zambia ZM Zimbabwe ZW
  182.  
  183. #EXTRAS
  184. push country.info "Commercial Organization (US)" COM
  185. push country.info "Educational Institution (US)" EDU
  186. push country.info "Networking Organization (US)" NET
  187. push country.info "U.S. Military" MIL "Non-Profit Organization" ORG
  188. push country.info "Government (US)" GOV
  189. push country.info "Korea - Democratic People's Republic of" KP
  190. push country.info "Korea - Republic Of" KR
  191. push country.info "Lao People's Democratic Republic" LA
  192. push country.info Slovakia SK
  193.  
  194. ############# END OF THE /COUNTRY FUNCTION
  195. /* This file has not been truncated! */
  196.